package com.wunu.smartlock1.net.response;

import com.google.gson.annotations.SerializedName;

public class ApiSimpleResponse implements ApiResponse<ApiSimpleResponse.ApiSimpleData> {
    private int code;
    @SerializedName("error")
    private String errorMsg;
    private ApiSimpleData data;


    @Override
    public ApiSimpleData getData() {
        return data;
    }

    @Override
    public void setData(ApiSimpleData data) {

    }

    @Override
    public int getCode() {
        return 0;
    }

    @Override
    public void setCode(int code) {

    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public static class ApiSimpleData {
        private int code;
        private String msg;

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }

        public String getMsg() {
            return msg;
        }

        public void setMsg(String msg) {
            this.msg = msg;
        }

        @Override
        public String toString() {
            return "ApiSimpleData{" +
                    "code=" + code +
                    ", msg='" + msg + '\'' +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "ApiSimpleResponse{" +
                "code=" + code +
                ", errorMsg='" + errorMsg + '\'' +
                ", data=" + data +
                '}';
    }
}
